package com.zry.study.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;

import com.zry.study.MainActivity;
import com.zry.study.R;


public class Splash extends PermissionActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		View view = getLayoutInflater().inflate(R.layout.activity_splash, null);
		AlphaAnimation animation = new AlphaAnimation(0.3f, 1.0f);
		animation.setDuration(1000);
		animation.setAnimationListener(new AnimationListener() {
			
			@Override
			public void onAnimationStart(Animation animation) {
			}
			
			@Override
			public void onAnimationRepeat(Animation animation) {
			}
			
			@Override
			public void onAnimationEnd(Animation animation) {
				//页面加载完成的操作
			}
		});
		view.setAnimation(animation);
		setContentView(view);
		
		findViewById(R.id.nextBtn).setOnClickListener(v -> getUserInfoByUnionID());
	}
	
	
	//跳转到主界面
	private void getUserInfoByUnionID() {
		Intent intent = new Intent(this, MainActivity.class);
		startActivity(intent);
	}
}